home *** CD-ROM | disk | FTP | other *** search
/ The Best of MacTutor - S…e Code for Volumes 1 to 5 / The Best of MacTutor - Source Code for Volume 1-5 (Wayzata Technology)(6031)(1990).bin / Source Code / #38 (Nov 88) / IAC / New Driver Stuff / driver.b next >
Text File  |  1988-08-13  |  2KB  |  47 lines

  1. ###         general.b - Build any Double Helix auxiliary program.
  2. #
  3. #     Usage:
  4. #        Set exit [0 | 1];
  5. #        #    If exit == 0, all compiles and assemblies will be completed.  If
  6. #        #                                any errors occur, subsequent steps will be skipped.
  7. #        # If exit == 1, the procedure stops after the first error occurs.
  8. #
  9. #        Set hlxSrc "source directory"; Export hlsSrc
  10. #        Set hlxEtc "result directory"; Export hlsEtc
  11. #        Set hlxProg "auxiliary program"; Export hlsProg
  12. #     general.b [ -r | -m] [makeParams…]
  13. #     #     -r                    Repeat previous build, using existing "{hlxEtc}makeout".
  14. #     #                                 (Actually, this option merely suppresses the "makeout" creation.)
  15. #     #                                 Must be the first (and only) parameter.
  16. #     #     -m                    Make "{hlxEtc}makeout", but do not execute it.
  17. #     #                                 Must be the first parameter.
  18. #     #     makeParams    Additional parameters to make; e.g.:
  19. #     #                                 -d pr="-p"    Report progress
  20. #     #                                 -d e="#"        Suppress log detail
  21. #     #                                 -e                    Make everything.
  22. #     #                                 -t                    Merely touch dates to bring everything up-to-date.
  23.  
  24. open "{log}"
  25. #open "{worksheet}"
  26. echo `Date -a -t` `Date -s -d` Start {hlxAlt} >> "{log}"
  27.  
  28. cd "{hlxSrc}"
  29. set result Done
  30. if "{1}" == "-m"
  31.     set result Made
  32.     shift 1
  33. end
  34. if "{1}" <> "-r"
  35.     If {result} == Done
  36.         echo set err 0 > "{hlxEtc}makeout"
  37.         unset err
  38.         make {"parameters"} -f {hlxprg}.m >> "{hlxEtc}makeout"
  39.     end || Set result Failed
  40. end
  41. if {result} == "Done"
  42.     "{hlxEtc}makeout" || Set result Failed
  43. end
  44. echo `Date -a -t` `Date -s -d` {result} >> "{log}"
  45. beep
  46. exit 1 If result == Failed
  47.